package cn.gson.springboot.model.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.gson.springboot.model.dao.RegisteredDAO;
import cn.gson.springboot.model.pojos.RegisteredPx;

@Service
@Transactional(rollbackFor=Exception.class)
public class Registeredserivce {//改serivce写在Ghlcontroller
	@Autowired 
	private  RegisteredDAO regdao;
	
	
	//新增挂号记录
	public void addregistered(RegisteredPx reg) {
		regdao.save(reg);
	}
	
	//根据门诊查询挂号实体对象
	public  RegisteredPx idreg(Integer outpatientId) {
		RegisteredPx idreg = regdao.idreg(outpatientId);
		return idreg;
	}
}
